<?php 
return [
	'name' => '点击记录',
	'description' => '记录栏目和内容的点击量',
	'version' => '1.0.0',
	'author' => '谢蕾',
	'weburl' => 'http://www.ebcms.com/',
	'hooks'=>[
		'home_start' => [function(){
			if (\mylib\App::$module === 'home' && \mylib\App::$controller === 'Content') {
				if (\mylib\App::$action === 'index') {
					\Ebcms::db() -> update('channel',[
						'click[+]' => 1,
					],[
						'id'=>\mylib\Input::param('id')
					]);
				}
				if (\mylib\App::$action === 'detail') {
					\Ebcms::db() -> update('content',[
						'click[+]' => 1,
					],[
						'id'=>\mylib\Input::param('id')
					]);
				}
			}
		}]
	],
	'install' => function(){
		return true;
	},
	'uninstall' => function(){
		return true;
	}
];